package hadoop.mr07;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class DbMapper extends Mapper<LongWritable,stuTable, Text, NullWritable> {
    Text t1 = new Text();
    @Override
    protected void map(LongWritable key, stuTable value, Mapper<LongWritable, stuTable, Text, NullWritable>.Context context) throws IOException, InterruptedException {
        String stu = value.toString();
        t1.set(stu);
        context.write(t1,NullWritable.get());
    }
}
